import React, {Component} from 'react';
import {IUserInfo} from "interface/login";

interface IUserInfoProps{
    userInfo:IUserInfo
}
interface IUserInfoState{
}
class UserInfo extends Component<IUserInfoProps,IUserInfoState> {

    render() {
        console.log(this.props)
        return (
            <div>
                <div>用户id:<b>{this.props.userInfo?.userId}</b></div>
                <div>用户名:<b>{this.props.userInfo?.username}</b></div>
                <div>token:<b>{this.props.userInfo?.token}</b></div>
            </div>
        );
    }
}


// const mapStateToProps=(state:any)=>{
//     console.log(state)
//     return state.app
// }
//
// const mapDispatchToProps={}
//
// const WithConnect=connect(mapStateToProps,mapDispatchToProps)(UserInfo)
export default UserInfo
